package com.testingedu.utils;

import java.text.DateFormat;
import java.util.Date;

public class TimeUtils {
	/**
	 * 由今天时间的字符串得到昨天的字符串
	 * @param today
	 * @return
	 * @throws Exception
	 */
	public static String yesterday(String today) throws Exception{
		Date to = DateFormat.getDateInstance().parse(today);
		Long ms = to.getTime() - 1000 * 60 * 60 * 24;
		Date ye = new Date(ms);
		return Format.formatDateDay(ye);
	}
}
